package com.mxx.common.generator.convert;

import com.mxx.common.generator.EntityField;

import java.util.ArrayList;
import java.util.List;

public class TypeConvertHandler {

    private List<TypeConvert> list = new ArrayList<>();


    public TypeConvertHandler() {
    }

    public void convert(EntityField entityField) {
        for (TypeConvert convert : list) {
            if (convert.convert(entityField)) {
                break;
            }
        }
    }
    public TypeConvertHandler register(TypeConvert typeConvert) {
        this.list.add(typeConvert);
        return this;
    }
}
